package main

import (
	"fmt"
	"github.com/go-git/go-git/v5"
	"github.com/go-git/go-git/v5/plumbing/transport/http"
	"os"
)

func main()  {
	Info("git clone https://gitee.com/yu_sheng/rongyao.git")

	 git.PlainClone("./tmp/rongyao", false, &git.CloneOptions{
		Auth: &http.BasicAuth{
			Username: "1194979849@qq.com",
			Password: "Qq1194979849",
		},
		URL:"https://gitee.com/yu_sheng/rongyao",
		Progress: os.Stdout,
	})

	//CheckIfError(err)
}

func CheckIfError(err error) {
	if err != nil {
		fmt.Print(err)
	}
}

func Info(s string) {
	fmt.Print(s)
}
